package yifeng.serializable;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class Serializabler {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Manager m = Manager.getInstance();
		m.setLevel(1);
		m.setName("ttt");

		try {
			FileOutputStream fileStream = new FileOutputStream("d:/ttt.data");
			ObjectOutputStream objStream = new ObjectOutputStream(fileStream);
			objStream.writeObject(m);
			objStream.flush();
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
